package com.common.common;

import com.common.common.utils.LogUtils;

import io.reactivex.observers.DisposableObserver;

public abstract class HttpRxObserver<T> extends DisposableObserver<T> {
    private static final String TAG = "HttpRxObserver";
    @Override
    public void onNext(T t) {
        onHandleSuccess(t);
    }

    @Override
    public void onError(Throwable e) {
        LogUtils.e(TAG,e.getMessage());
    }

    @Override
    public void onComplete() {
        LogUtils.e(TAG,"onComplete");
    }

    protected abstract void onHandleSuccess(T t);

}
